// pages/recommend/recommend.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    num:2,
    deg:0,
    num2:2,
    deg2:0,
    zhankaiHidden:'展开',
    zhankaiHidden2:'展开',
    info:[]
  },
  zhankai:function (e) {
    var that = this;
    if(that.data.num == 2) {
      that.setData({
        num: 0,
        deg:180,
        zhankaiHidden:'收起'
      })
    }else {
      that.setData({
        num: 2,
        deg:0,
        zhankaiHidden:'展开'
      })
    }
   
  },
  zhankai2:function() {
    var that = this;
    if (that.data.num2 == 2) {
      that.setData({
        num2: 0,
        deg2: 180,
        zhankaiHidden2:'收起'
      })
    } else {
      that.setData({
        num2: 2,
        deg2: 0,
        zhankaiHidden2:'展开'
      })
    }
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    var docid = options.id;
    wx.request({
      url: app.d.ceshiUrl + '/Api/Doctor/details',
      method: "post",
      data: {
        docid: docid,
      },
      header: {
        'Content-Type': 'application/x-www-form-urlencoded'
      },
      success: function (res) {
        console.log(res)
        if (res.data.status == 1) {
          that.setData({
            info: res.data.info
          });
        } else {
          wx.showToast({
            title: res.data.err,
          })
        }
      },
      fail: function (e) {
        wx.showToast({
          title: '网络异常！',
          duration: 30000
        });
      },
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})